// #ifdef VUE3

import {
	createStore
} from 'vuex'

const store = createStore({
	state: {
		userInfo: null,
		token: '',
		tempUser: {},
		kf: '' // 客服电话
	},
	mutations: {
		saveUserInfo(state, user) {
			state.userInfo = user;
		},
		saveToken(state, token) {
			state.token = token;
			uni.setStorageSync("sstoken",token)
		},
		saveTempUser(state, user) {
			state.tempUser = user
		},
		saveKF(state, mobile) {
			state.kf = mobile
		}
	},
	actions: {

	}
})
export default store;
//#endif